<?php
declare (strict_types = 1);

namespace app\api\controller;

use ulit\thirdPayment\SafePay;
use ulit\thirdPayment\CanLangPay;

class Index
{
    public function index()
    {



        $orderNo=(string) date('YmdHis').rand(1111,4444);
        $amount=1;
        $identityType='ALIPAY_LOGON_ID';
        $identity='13527319507';
        $name="李骄";
        $remark="记账";
        $showName="";
        $notifyUrl="https://pay.canglan2024.cn/api.php/Payment/notify";
        $orderTitle="沧澜科技有限公司";
        $accountType="1";


        /**
         * "msg" => "Success"
         * "trans_date" => "2024-10-29 10:54:27"
         * "code" => "10000"
         * "pay_fund_order_id" => "20241029020070011530660030924012"
         * "out_biz_no" => "202410291054332619"
         * "order_id" => "20241029020070011530660030924012"
         * "status" => "SUCCESS"
         */
        $orderNo='202410291054332619';

        $result=CanLangPay::getInstance()->query($orderNo);
        dump($result);die;


        $info=CanLangPay::getInstance()->withdraw($orderNo,$amount,$identityType,$identity,$name,$remark,$showName,$notifyUrl,$orderTitle,$accountType);



        $data=['orderCode'=>date('YmdHis').rand(1111,4444),'title'=>'测试10员','detail'=>'测试详情','payMoney'=>'10','appConfigId'=>'8529364103645593601'];
        $result=SafePay::getInstance()->withdraw('a','a','a','a','a',1.1,'a','a','a','a');
//        $url='/v1/safe/withdrawList';
//        $data=['appConfigId'=>'8529364103645593601','channelName'=>'SafePay'];
      //  $result=$auth->curlPay($url,json_encode($data),'GET');

        print_r($result);;die;


        return '您好！这是一个[api]示例应用';
    }
}
